#ifndef UDPPOINTSETSWITCHCMD_H
#define UDPPOINTSETSWITCHCMD_H

#include "Command/BaseCmd.h"
#include "Protocol/PointProtocol.h"

class UdpPointSetSwitchCmd : public BaseCmd
{
    Q_OBJECT
public:

    enum{FunctionCode = PointProtocol::SetUdpSwitch};
 //   enum{PointFunctionCode = PointProtocol::ControlPoint};
    Q_INVOKABLE explicit UdpPointSetSwitchCmd(QObject *parent = 0);

    Package toPackage();
    void unPackage(Package package);

    quint16 address() const;
    void setAddress(const quint16 &address);

    quint16 DeviceID() const;

    QByteArray value() const;
    void setValue(QByteArray value);

private:
    quint16 m_address;
    quint16 m_valuelen;
    quint16 m_DeviceID;
    QByteArray m_value;
};



class UdpPointRelay : public BaseCmd
{
    Q_OBJECT
public:

    enum{FunctionCode = PointProtocol::ControlPoint};
 //   enum{PointFunctionCode = PointProtocol::ControlPoint};
    Q_INVOKABLE explicit UdpPointRelay(QObject *parent = 0);

    Package toPackage();
    void unPackage(Package package);

    quint16 address() const;
    void setAddress(const quint16 &address);

    quint16 DeviceID() const;

    quint16 value() const;
    void setValue(const quint16 &value);

private:
    quint16 m_address;
    quint16 m_value;
};
#endif // UDPPOINTSETSWITCHCMD_H
